package expression;

import common.MCore;

public class MSumCst extends MBasicExprCst {

	public MSumCst(MCore c) {
		super(c);
	}

	public int compute() {
		int v = 0;
		
		for (MIntExprCst i: getParameters()) {
			v += i.compute();
		}
		
		return v;
	}

	public MIntCst eval() {
		return new MIntCst(getCore(), compute());
	}
}
